package ch05.ioc;

public class Printer {
    private Ink ink ;
    private Paper paper ;

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public  void print(){
        System.out.println("打印机在"+ink.getColor()+"墨盒上打印,在"+paper.getSize()+"纸张上打印");
    }
}
